package com.tangshuai.video.config;

import com.tangshuai.video.constant.SystemConstant;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author TANGSHUAI
 * @Date 2024-03-03 21:45
 **/
@Configuration
public class MyConfiguration implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
        registry.addResourceHandler("/tv/**").addResourceLocations("file:"+ SystemConstant.FILEPARTITION);
    }
}
